﻿#region File and License Information
/*
<File>
	<License Type="BSD">
		Copyright © 2009 - 2012, Daniel Vaughan. All rights reserved.
	
		This file is part of Calcium (http://calciumsdk.net).

		Redistribution and use in source and binary forms, with or without
		modification, are permitted provided that the following conditions are met:
			* Redistributions of source code must retain the above copyright
			  notice, this list of conditions and the following disclaimer.
			* Redistributions in binary form must reproduce the above copyright
			  notice, this list of conditions and the following disclaimer in the
			  documentation and/or other materials provided with the distribution.
			* Neither the name of the <organization> nor the
			  names of its contributors may be used to endorse or promote products
			  derived from this software without specific prior written permission.

		THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
		ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
		WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
		DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
		DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
		(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
		LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
		ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
		(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
		SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
	</License>
	<Owner Name="Daniel Vaughan" Email="danielvaughan@outcoder.com" />
	<CreationDate>2009-05-17 19:18:07Z</CreationDate>
</File>
*/
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;

using DanielVaughan.Services;

namespace DanielVaughan.Calcium.ClientServices
{
	public interface ICommunicationCallback
	{
		[OperationContract(IsOneWay = true)]
		void OnConnectedUserJoined(ConnectedUser connectedUser);

		[OperationContract(IsOneWay = true)]
		void OnConnectedUserDeparted(ConnectedUser connectedUser);

		[OperationContract(IsOneWay = true)]
		void OnConnectedUsersUpdate(IEnumerable<ConnectedUser> connectedUsers);

		#region For IMessageService
//		/// <summary>
//		/// Shows a message to a user that must be dismissed before continuing.
//		/// </summary>
//		/// <param name="message">The message to display.</param>
//		/// <param name="importanceThreshold">The minimum filter level 
//		/// that a user must have in order to receive the message.</param>
//		[OperationContract(IsOneWay = true, Name = "ShowMessage1")]
//		void ShowMessage(string message, MessageImportance importanceThreshold);

		/// <summary>
		/// Shows a message to a user that must be dismissed before continuing.
		/// </summary>
		/// <param name="message">The message to display.</param>
		/// <param name="caption">The caption to display on the dialog.</param>
		/// <param name="importanceThreshold">The minimum filter level 
		/// that a user must have in order to receive the message.</param>
		[OperationContract(IsOneWay = true, Name = "ShowMessage1WithCaption")]
		void ShowMessage(string message, string caption, MessageImportance importanceThreshold, string details);

//		/// <summary>
//		/// Shows a warning message to a user that must be dismissed before continuing.
//		/// </summary>
//		/// <param name="message">The message to display.</param>
//		[OperationContract(IsOneWay = true, Name = "ShowWarning1")]
//		void ShowWarning(string message);

		/// <summary>
		/// Shows a warning message to a user that must be dismissed before continuing.
		/// </summary>
		/// <param name="message">The message to display.</param>
		/// <param name="caption">The caption to display on the dialog.</param>
		[OperationContract(IsOneWay = true, Name = "ShowWarning1WithCaption")]
		void ShowWarning(string message, string caption, string details);

//		/// <summary>
//		/// Shows an error message to a user that must be dismissed before continuing.
//		/// </summary>
//		/// <param name="message">The message to display.</param>
//		[OperationContract(IsOneWay = true, Name = "ShowError1")]
//		void ShowError(string message);

		/// <summary>
		/// Shows an error message to a user that must be dismissed before continuing.
		/// </summary>
		/// <param name="message">The message to display.</param>
		/// <param name="caption">The caption to display on the dialog.</param>
		[OperationContract(IsOneWay = true, Name = "ShowError1WithCaption")]
		void ShowError(string message, string caption, string details);

//		/// <summary>
//		/// Asks the user a question where the valid response is either 'yes' or 'no'.
//		/// </summary>
//		/// <param name="question">The question text.</param>
//		/// <returns><code>true</code> if the user selected 'yes'; 
//		/// <code>false</code> otherwise.</returns>
//		[OperationContract(Name = "AskYesNoQuestion1")]
//		bool AskYesNoQuestion(string question, string caption, string details);

		/// <summary>
		/// Asks the user a question where the valid response is either 'yes' or 'no'.
		/// </summary>
		/// <param name="question">The question text.</param>
		/// <param name="caption">The caption to display on the dialog.</param>
		/// <returns><code>true</code> if the user selected 'yes'; 
		/// <code>false</code> otherwise.</returns>
		[OperationContract(Name = "AskYesNoQuestion1WithCaption")]
		bool AskYesNoQuestion(string question, string caption, string details);

//		/// <summary>
//		/// Asks the user a question where the valid response is either 'yes', 'no', or 'cancel.'
//		/// </summary>
//		/// <param name="question">The question text.</param>
//		/// <returns>The answer from the user. <see cref="YesNoCancelQuestionResult"/></returns>
//		[OperationContract(Name = "AskYesNoCancelQuestion1")]
//		YesNoCancelQuestionResult AskYesNoCancelQuestion(string question, string caption, string details);

		/// <summary>
		/// Asks the user a question where the valid response is either 'yes', 'no', or 'cancel.'
		/// </summary>
		/// <param name="question">The question text.</param>
		/// <param name="caption">The caption to display on the dialog.</param>
		/// <returns>The answer from the user. <see cref="YesNoCancelQuestionResult"/></returns>
		[OperationContract(Name = "AskYesNoCancelQuestion1WithCaption")]
		YesNoCancelQuestionResult AskYesNoCancelQuestion(string question, string caption, string details);

//		/// <summary>
//		/// Asks the user a question where the valid response is either 'ok' or 'cancel.'
//		/// </summary>
//		/// <param name="question">The question text.</param>
//		/// <returns><code>true</code> if the user selected 'ok'; 
//		/// <code>false</code> otherwise.</returns>
//		[OperationContract(Name = "AskOkCancelQuestion1")]
//		bool AskOkCancelQuestion(string question);

		/// <summary>
		/// Asks the user a question where the valid response is either 'ok' or 'cancel.'
		/// </summary>
		/// <param name="question">The question text.</param>
		/// <param name="caption">The caption to display on the dialog.</param>
		/// <returns><code>true</code> if the user selected 'ok'; 
		/// <code>false</code> otherwise.</returns>
		[OperationContract(Name = "AskOkCancelQuestion1WithCaption")]
		bool AskOkCancelQuestion(string question, string caption, string details);

		[OperationContract(Name = "AskQuestionWithTextResponse")]
		TextResponse AskQuestionWithTextResponse(TextResponseQuestion textResponseQuestion);
		#endregion
	}
}
